package ltd.newbee.mall.util.paypal;


import com.paypal.core.PayPalHttpClient;
import com.paypal.http.HttpResponse;

import java.io.IOException;

/**
 * 订单执行者
 * @author pyw
 */
public class OrderExecutor {

    private OrderAbstractHandler orderAbstractHandler;

    public OrderExecutor(OrderAbstractHandler orderAbstractHandler) {
        this.orderAbstractHandler = orderAbstractHandler;
    }

    /**
     * 执行方法
     * @param id 相应id
     * @param payPalHttpClient 请求客户端
     * @return 响应体
     * @throws IOException io
     */
    public HttpResponse<?> getResponseMessage(String id, PayPalHttpClient payPalHttpClient) throws IOException {
        return this.orderAbstractHandler.getResponseMessage(id, payPalHttpClient);
    }
}
